/* eslint-disable @typescript-eslint/no-explicit-any */
import { AllowAnon } from '@/decorators/allow-anon.decortors';
import { Body, Controller, Get, Post } from '@nestjs/common';
import { XzkService1, XzkService2, chat1 } from './xzk.service';

@Controller('XzkService1')
export class XzkController1 {
  constructor(private ossServic: XzkService1) {}
  @Get('/upload')
  @AllowAnon()
  async upload() {
    return this.ossServic.upload();
  }

  // 添加
  @Get('/Insert')
  @AllowAnon()
  async Insert() {
    return this.ossServic.Insert();
  }
  // 删除
  @Post('/Delete')
  @AllowAnon()
  async Delete(@Body() data: any) {
    return this.ossServic.Delete(data);
  }
  // 查找
  @Get('/Cha')
  @AllowAnon()
  async Cha() {
    return this.ossServic.Cha();
  }

  // 修改
  @Post('/Update')
  @AllowAnon()
  async Update(@Body() data: any) {
    return this.ossServic.Update(data);
  }
}

@Controller('XzkService2')
export class XzkController2 {
  constructor(private ossServic: XzkService2) {}
  @Get('/upload')
  @AllowAnon()
  async upload() {
    return this.ossServic.upload();
  }

  // 添加
  @Get('/Insert')
  @AllowAnon()
  async Insert() {
    return this.ossServic.Insert();
  }
  // 删除
  @Get('/Delete')
  @AllowAnon()
  async Delete() {
    return this.ossServic.Delete();
  }
  // 查找
  @Get('/Cha')
  @AllowAnon()
  async Cha() {
    return this.ossServic.Cha();
  }

  // 修改
  @Get('/Update')
  @AllowAnon()
  async Update() {
    return this.ossServic.Update();
  }
}

@Controller('chat1')
export class chat11 {
  constructor(private ossServic: chat1) {}
  @Get('/upload')
  @AllowAnon()
  async upload() {
    return this.ossServic.upload();
  }

  // 添加
  @Get('/Insert')
  @AllowAnon()
  async Insert() {
    return this.ossServic.Insert();
  }
  // 删除
  @Get('/Delete')
  @AllowAnon()
  async Delete() {
    return this.ossServic.Delete();
  }
  // 查找
  @Get('/Cha')
  @AllowAnon()
  async Cha() {
    return this.ossServic.Cha();
  }

  // 修改
  @Post('/Update')
  @AllowAnon()
  async Update(@Body() data: any) {
    return this.ossServic.Update(data);
  }
}
